<!DOCTYPE html>
<html style="height:100%">
<head>
    <title></title>
    <% include ../../layouts/import.ejs %>
</head>
<body style="height:100%">
<div class="index height">
    <% include ../../layouts/header.ejs %>
    <form id="searchForm" role="form" action="/person/search" method="post">
        <div class="container">
            <div class="row">
                <div style="margin-top:20px" class="panel panel-default">
                    <div class="panel-body">
                        <div style="margin:0" class="row form-group form-group-sm">
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <span class="input-group-addon">用户名称</span>
                                    <div class="input-group col-sm-12"><input name="personName" placeholder="请输入用户名称"
                                                                              class="form-control"></div>
                                </div>
                            </div>
                            <div class="col-sm-2">
                                <button type="submit" id="qryBtn" class="person-sreach btn btn-primary btn-sm">查询
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="person-panel-heading">
                    <div class="pull-left person-new">
                        <span class="glyphicon glyphicon-user"></span>
                        <span>用户管理</span>
                    </div>
                    <div class="pull-right">
                        <a type="button" href="/person/add">
                            <span class="glyphicon glyphicon-plus person-add"></span>
                        </a>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <table class="table table-bordered table-hover table-striped table-condensed person-refence" >
                    <thead>

                    <tr>
                        <th width=15% class="align-center">编号</th>
                        <th width=15% class="align-center">账号</th>
                        <th width=15% class="align-center">用户名</th>
                        <th width=10% class="align-center">年龄</th>
                        <th width=10% class="align-center">性别</th>
                        <th width=20% class="align-center">联系方式</th>
                        <th width=15% class="align-center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <% for (var i = 0;i < personList.length;i++){ %>
                    <tr>
                        <td class="align-center"><%= personList[i].id %></td>
                        <td class="align-center"><%= personList[i].loginname %></td>
                        <td class="align-center"><%= personList[i].person_name %></td>
                        <td class="align-center"><%= personList[i].person_sex %></td>
                        <td class="align-center"><%= personList[i].person_age %></td>
                        <td class="align-center"><%= personList[i].person_contact_information %></td>
                        <td class="align-center">
                            <a href="/person/edit/<%= personList[i].id %>" class="btn btn-default btn-xs btn-update person-edit">修改</a>
                            <a href="/person/delete/<%= personList[i].id %>" style="margin-left:10px" class="btn btn-default btn-xs btn-del person-delete">删除</a>
                        </td>
                    </tr>
                    <% } %>
                    </tbody>
                </table>
            </div>
        </div>
    </form>
    <% include ../../layouts/footer.ejs %>

</div>
</body>

<script>
    $(function () {
        $('#person-management').addClass('select-active')
    })
</script>
</html>